<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//This class is a wrapper around SplObjectStorage class.
class Inventory {

    private $storage;

    //attach count detach key next rewind removeAll current 
    function __construct() {
        $this->storage = new SplObjectStorage();
    }

    public function attach($obj, $key) {
        $this->storage->attach($obj, $key);
    }

    public function contains($obj) {
        return $this->storage->contains($obj);
    }

    public function addAll(SplObjectStorage $storage) {
        $this->storage->addAll($storage);
    }

    public function count() {
        return $this->storage->count();
    }

    public function current() {
        return $this->storage->current();
    }

    public function key() {
        return $this->storage->key();
    }

    public function detach($obj) {
        $this->storage->detach($obj);
    }

    public function next() {
        $this->storage->next();
    }

    public function rewind() {
        $this->storage->rewind();
    }

    public function getStorage() {
        return $this->storage;
    }

    public function setStorage($storage) {
        $this->storage = $storage;
    }
    public function valid(){
        return $this->storage->valid();
    }

}

?>
